home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / hiz / 09 / 09.exe / adynware.exe / perl / lib / ExtUtils / MM_OS2.pm < prev    next >
Encoding:
Perl POD Document  |  1999-12-28  |  1.9 KB  |  82 lines

  1. package ExtUtils::MM_OS2;
  2.  
  3. require Exporter;
  4.  
  5. Exporter::import('ExtUtils::MakeMaker',
  6.        qw( $Verbose &neatvalue));
  7.  
  8. $ENV{EMXSHELL} = 'sh'; # to run `commands`
  9. unshift @MM::ISA, 'ExtUtils::MM_OS2';
  10.  
  11. sub dlsyms {
  12.     my($self,%attribs) = @_;
  13.  
  14.     my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
  15.     my($vars)  = $attribs{DL_VARS} || $self->{DL_VARS} || [];
  16.     my($imports)  = $attribs{IMPORTS} || $self->{IMPORTS} || {};
  17.     my(@m);
  18.     (my $boot = $self->{NAME}) =~ s/:/_/g;
  19.  
  20.     if (not $self->{SKIPHASH}{'dynamic'}) {
  21.     push(@m,"
  22. $self->{BASEEXT}.def: Makefile.PL
  23. ",
  24.      '    $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\
  25.      Mksymlists("NAME" => "', $self->{NAME},
  26.      '", "DLBASE" => "',$self->{DLBASE},
  27.      '", "DL_FUNCS" => ',neatvalue($funcs),
  28.      ', "IMPORTS" => ',neatvalue($imports),
  29.      ', "DL_VARS" => ', neatvalue($vars), ');\'
  30. ');
  31.     }
  32.     join('',@m);
  33. }
  34.  
  35. sub replace_manpage_separator {
  36.     my($self,$man) = @_;
  37.     $man =~ s,/+,.,g;
  38.     $man;
  39. }
  40.  
  41. sub maybe_command {
  42.     my($self,$file) = @_;
  43.     return $file if -x $file && ! -d _;
  44.     return "$file.exe" if -x "$file.exe" && ! -d _;
  45.     return "$file.cmd" if -x "$file.cmd" && ! -d _;
  46.     return;
  47. }
  48.  
  49. sub file_name_is_absolute {
  50.     my($self,$file) = @_;
  51.     $file =~ m{^([a-z]:)?[\\/]}i ;
  52. }
  53.  
  54. sub perl_archive
  55. {
  56.  return "\$(PERL_INC)/libperl\$(LIB_EXT)";
  57. }
  58.  
  59. sub export_list
  60. {
  61.  my ($self) = @_;
  62.  return "$self->{BASEEXT}.def";
  63. }
  64.  
  65. 1;
  66. __END__
  67.  
  68. =head1 NAME
  69.  
  70. ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
  71.  
  72. =head1 SYNOPSIS
  73.  
  74.  use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
  75.  
  76. =head1 DESCRIPTION
  77.  
  78. See ExtUtils::MM_Unix for a documentation of the methods provided
  79. there. This package overrides the implementation of these methods, not
  80. the semantics.
  81.  
  82.